package com;

import com.component.domain.Content;
import com.component.domain.MChannel;
import com.component.service.ContentService;
import com.component.service.NoteService;
import com.system.common.ContextUtils;
import com.system.es.EsServer;
import com.system.util.DBtemp;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Map;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/6/5 23:41
 * @since JDK 1.8
 */
@SpringBootApplication
@EnableScheduling
@EnableCaching
public class NoteApplication {

    public static void main(String[] args) {
        SpringApplication.run(NoteApplication.class,args);
    }


    @Autowired
    private EsServer esServer;

    @Autowired
    private NoteService noteService;

    @Autowired
    private ContentService contentService;

    //3.添加定时任务
    @Scheduled(cron = "0 0/5 * * * ?")
    //或直接指定时间间隔，例如：5秒
    //@Scheduled(fixedRate=5000)
    private void configureTasks() {
        System.out.println("1111111");
     //  dBtemp.tempDB();
    }



    private void clearNotExistsFile(){

    }

}
